Open
Conversation
Check for idempotency of collate= migrations
This lets the initial CREATE TABLE expression generate correctly with the collate clause, eliding the need for an immediate automigration to collate columns.
This new function allows for creating a `RawSqlite SqlBackend` manually (without exposing the `RawSqlite` constructor) for code that wants to open such a connection without having to opt-in to the resource management of `withRawSqliteConnInfo` and co. This is useful in my particular use case for creating a custom pool, since I am not constrained by the `resource-pool` API re-exposed by `persistent-sqlite`.
Author
|
I'm just going to mark this PR ready for review in any case; we can review formatting manually if there's no easy way to work around this issue. |
parsonsmatt
reviewed
Sep 18, 2023
Collaborator
parsonsmatt
left a comment
There was a problem hiding this comment.
Overall looks great!
This is unfortunately a breaking change and will need to wait for 2.15 to go out.
| -- will associate with a particular field. | ||
| -- | ||
| -- @since 2.15.0.0 | ||
| newtype CollationName = CollationName { unCollatioName :: Text } |
Collaborator
There was a problem hiding this comment.
Suggested change
| newtype CollationName = CollationName { unCollatioName :: Text } | |
| newtype CollationName = CollationName { unCollationName :: Text } |
Comment on lines
+14
to
+18
| * [#1488](https://github.com/yesodweb/persistent/pull/1488) | ||
| * Add `openRawSqliteConn` for creating `RawSqlite SqlBackend` connections | ||
| that aren't automatically cleaned-up. | ||
| * [#1459](https://github.com/yesodweb/persistent/pull/1459) | ||
| * Make use of `CautiousMigration` type alias for clarity. |
Collaborator
There was a problem hiding this comment.
These changelog entries will need to be moved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
openRawSqliteConn#1488For context, these features were up-ported from a feature branch we have been using at Supercede. This branch was in turn branched off of #1488 , thus this PR will effectively subsume it since it hasn't been merged yet. Isaac (the PR author) has left the company since then, so I believe the original PR will remain stale.
Tests may be lacking; please do inform me if I overlooked anything test-wise!
Before submitting your PR, check that you've:
@sincedeclarations to the Haddockstylish-haskellon any changed files..editorconfigfile for details)After submitting your PR:
(unreleased)on the Changelog